﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="../Themes/GlassTheme.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <Style x:Key="GlassButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="{StaticResource FillColor}"/>
        <Setter Property="Foreground" Value="#FFFFFFFF"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="White" Offset="0"/>
                    <GradientStop Color="White" Offset="1"/>
                    <GradientStop Color="White" Offset="0.5"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
        	<Setter.Value>
       		    <ControlTemplate TargetType="Button">
					<Grid x:Name="grid">
						<Grid.RenderTransform>
							<CompositeTransform/>
						</Grid.RenderTransform>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Disabled"/>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver">
									<Storyboard>
										<ColorAnimation Duration="0" To="#88FFFFFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
									</Storyboard>
								</VisualState>
								<VisualState x:Name="Pressed"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="ButtonBorder" CornerRadius="13,13,13,13" BorderThickness="2,2,2,2" Background="#AA000000" BorderBrush="#99FFFFFF" RenderTransformOrigin="0.5,0.5">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="*"/>
									<RowDefinition Height="*"/>
								</Grid.RowDefinitions>
								<Border Grid.Row="0" CornerRadius="10,10,0,0" Background="{TemplateBinding Background}" />
								<Border x:Name="border" Grid.Row="0" CornerRadius="10,10,0,0">
									<Border.Background>
						                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
						                    <GradientStop Color="#88FFFFFF" Offset="1"/>
						                    <GradientStop Color="#00FFFFFF" Offset="0.5"/>
						                </LinearGradientBrush>
									</Border.Background>
								</Border>
								<ContentPresenter x:Name="ButtonContentPresenter"
									VerticalAlignment="Center"  
									Grid.RowSpan="2" 
									HorizontalAlignment="Center"/>
							</Grid>
						</Border>
					</Grid>
				</ControlTemplate>     	
			</Setter.Value>      
		</Setter>
    </Style>
    <!-- The Thumb for the slider control -->
    <Style x:Key="GlassThumbStyle" TargetType="Thumb">
    	<Setter Property="Background" Value="{StaticResource FillColor}"/>
    	<Setter Property="BorderThickness" Value="1"/>
    	<Setter Property="IsTabStop" Value="False"/>
    	<Setter Property="BorderBrush" Value="#FF888888"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="Thumb">
    				<Grid>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver">
    								<Storyboard>
    									<ColorAnimation Duration="0" To="#88FFFFFF" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
    								</Storyboard>
    							</VisualState>
    							<VisualState x:Name="Pressed"/>
    							<VisualState x:Name="Disabled"/>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="FocusStates">
    							<VisualState x:Name="Focused"/>
    							<VisualState x:Name="Unfocused"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="2">
    						<Grid Background="{TemplateBinding Background}" Margin="1">
								<Border Grid.Row="0" CornerRadius="0,0,0,0" Background="{TemplateBinding Background}" />
								<Border x:Name="border" Grid.Row="0" CornerRadius="0,0,0,0">
									<Border.Background>
						                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						                    <GradientStop Color="#FFFFFFFF" Offset="0"/>
						                    <GradientStop Color="#88FFFFFF" Offset="1"/>
						                    <GradientStop Color="#00FFFFFF" Offset="0.5"/>
						                </LinearGradientBrush>
									</Border.Background>
								</Border>
    						</Grid>
    					</Border>
    					<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="2" RadiusX="2"/>
    					<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="1" RadiusX="1" Stroke="#FF6DBDD1" StrokeThickness="1"/>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <!-- The slider control -->
    <Style x:Key="GlassSliderStyle" TargetType="Slider">
    	<Setter Property="BorderThickness" Value="3"/>
    	<Setter Property="Maximum" Value="10"/>
    	<Setter Property="Minimum" Value="0"/>
        <Setter Property="Background" Value="{StaticResource FillColor}"/>
    	<Setter Property="Value" Value="0"/>
    	<Setter Property="BorderBrush">
    		<Setter.Value>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#FFA3AEB9" Offset="0"/>
    				<GradientStop Color="#FF8399A9" Offset="0.375"/>
    				<GradientStop Color="#FF718597" Offset="0.375"/>
    				<GradientStop Color="#FF617584" Offset="1"/>
    			</LinearGradientBrush>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="IsTabStop" Value="False"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="Slider">
    				<Grid x:Name="Root">
    					<Grid.Resources>
    						<ControlTemplate x:Key="RepeatButtonTemplate">
    							<Grid x:Name="Root" Background="Transparent" Opacity="0"/>
    						</ControlTemplate>
    					</Grid.Resources>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HorizontalTrackRectangleDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ThumbDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="VerticalTrackRectangleDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Grid x:Name="HorizontalTemplate" Background="Transparent">
    						<Grid.ColumnDefinitions>
    							<ColumnDefinition Width="Auto"/>
    							<ColumnDefinition Width="Auto"/>
    							<ColumnDefinition Width="*"/>
    						</Grid.ColumnDefinitions>
    						<Rectangle x:Name="TrackRectangle" Grid.ColumnSpan="3" Grid.Column="0" Fill="Black" Height="3" Margin="5,0,5,0" RadiusY="1" RadiusX="1" Stroke="White" StrokeThickness="{TemplateBinding BorderThickness}"/>
    						<Rectangle x:Name="HorizontalTrackRectangleDisabledOverlay" Grid.ColumnSpan="3" Grid.Column="0" Fill="White" Height="3" Margin="5,0,5,0" Opacity=".55" RadiusY="1" RadiusX="1" Visibility="Collapsed"/>
    						<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" Grid.Column="0" Height="18" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
    						<Thumb x:Name="HorizontalThumb" Background="{TemplateBinding Background}" Grid.Column="1" Height="18" IsTabStop="True" Width="11" Style="{StaticResource GlassThumbStyle}"/>
    						<Rectangle x:Name="ThumbDisabledOverlay" Grid.Column="1" Fill="White" Opacity=".55" RadiusY="2" RadiusX="2" Visibility="Collapsed" Width="11"/>
    						<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2" Height="18" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
    					</Grid>
    					<Grid x:Name="VerticalTemplate" Background="Transparent" Visibility="Collapsed">
    						<Grid.RowDefinitions>
    							<RowDefinition Height="*"/>
    							<RowDefinition Height="Auto"/>
    							<RowDefinition Height="Auto"/>
    						</Grid.RowDefinitions>
    						<Rectangle Fill="#FFE6EFF7" Margin="0,5,0,5" RadiusY="1" Grid.Row="0" RadiusX="1" Grid.RowSpan="3" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" Width="3"/>
    						<Rectangle x:Name="VerticalTrackRectangleDisabledOverlay" Fill="White" Margin="0,5,0,5" Opacity=".55" RadiusY="1" Grid.Row="0" RadiusX="1" Grid.RowSpan="3" Visibility="Collapsed" Width="3"/>
    						<RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Grid.Row="2" Template="{StaticResource RepeatButtonTemplate}" Width="18"/>
    						<Thumb x:Name="VerticalThumb" Height="11" IsTabStop="True" Grid.Row="1" Width="18" Style="{StaticResource GlassThumbStyle}"/>
    						<RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Grid.Row="0" Template="{StaticResource RepeatButtonTemplate}" Width="18"/>
    					</Grid>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <!-- Invisible Button Style -->
    <Style x:Key="InvisibleButtonStyle" TargetType="Button">
        <Setter Property="Background" Value="Transparent"/>
        <Setter Property="Foreground" Value="#FFFFFFFF"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="0"/>
        <Setter Property="Template">
        	<Setter.Value>
       		    <ControlTemplate TargetType="Button">
					<Grid x:Name="grid">
						<Grid.RenderTransform>
							<CompositeTransform/>
						</Grid.RenderTransform>
						<VisualStateManager.VisualStateGroups>
							<VisualStateGroup x:Name="CommonStates">
								<VisualState x:Name="Disabled"/>
								<VisualState x:Name="Normal"/>
								<VisualState x:Name="MouseOver"/>
								<VisualState x:Name="Pressed"/>
							</VisualStateGroup>
						</VisualStateManager.VisualStateGroups>
						<Border x:Name="ButtonBorder" CornerRadius="5,5,5,5" BorderThickness="0,0,0,0" Background="Transparent" BorderBrush="#99FFFFFF" RenderTransformOrigin="0.5,0.5">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="*"/>
									<RowDefinition Height="*"/>
								</Grid.RowDefinitions>
								<Border Grid.Row="0" CornerRadius="10,10,0,0" Background="Transparent" />
								<ContentPresenter x:Name="ButtonContentPresenter"
									VerticalAlignment="Center"  
									Grid.RowSpan="2" 
									HorizontalAlignment="Center"/>
							</Grid>
						</Border>
					</Grid>
				</ControlTemplate>     	
			</Setter.Value>      
		</Setter>
    </Style>
    <!-- The Thumb for the slider control -->
    <Style x:Key="InvisibleThumbStyle" TargetType="Thumb">
    	<Setter Property="Background" Value="White"/>
    	<Setter Property="BorderThickness" Value="0"/>
    	<Setter Property="IsTabStop" Value="False"/>
    	<Setter Property="BorderBrush" Value="White"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="Thumb">
    				<Grid>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver"/>
    							<VisualState x:Name="Pressed"/>
    							<VisualState x:Name="Disabled"/>
    						</VisualStateGroup>
    						<VisualStateGroup x:Name="FocusStates">
    							<VisualState x:Name="Focused"/>
    							<VisualState x:Name="Unfocused"/>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Border x:Name="Background" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="White" CornerRadius="0">
    						<Grid Background="{TemplateBinding Background}" Margin="1">
								<Border Grid.Row="0" CornerRadius="0,0,0,0" Background="{TemplateBinding Background}" />
								<Border x:Name="border" Grid.Row="0" Background="White" CornerRadius="0,0,0,0"/>
    						</Grid>
    					</Border>
    					<Rectangle x:Name="DisabledVisualElement" Fill="#FFFFFFFF" IsHitTestVisible="false" Opacity="0" RadiusY="0" RadiusX="0"/>
    					<Rectangle x:Name="FocusVisualElement" IsHitTestVisible="false" Margin="1" Opacity="0" RadiusY="0" RadiusX="0" Stroke="#FF6DBDD1" StrokeThickness="1"/>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
    <!-- The invisible slider control -->
    <Style x:Key="InvisibleSliderStyle" TargetType="Slider">
    	<Setter Property="BorderThickness" Value="3"/>
    	<Setter Property="Maximum" Value="10"/>
    	<Setter Property="Minimum" Value="0"/>
        <Setter Property="Background" Value="{StaticResource FillColor}"/>
    	<Setter Property="Value" Value="0"/>
    	<Setter Property="BorderBrush">
    		<Setter.Value>
    			<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
    				<GradientStop Color="#FFA3AEB9" Offset="0"/>
    				<GradientStop Color="#FF8399A9" Offset="0.375"/>
    				<GradientStop Color="#FF718597" Offset="0.375"/>
    				<GradientStop Color="#FF617584" Offset="1"/>
    			</LinearGradientBrush>
    		</Setter.Value>
    	</Setter>
    	<Setter Property="IsTabStop" Value="False"/>
    	<Setter Property="Template">
    		<Setter.Value>
    			<ControlTemplate TargetType="Slider">
    				<Grid x:Name="Root">
    					<Grid.Resources>
    						<ControlTemplate x:Key="RepeatButtonTemplate">
    							<Grid x:Name="Root" Background="Transparent" Opacity="0"/>
    						</ControlTemplate>
    					</Grid.Resources>
    					<VisualStateManager.VisualStateGroups>
    						<VisualStateGroup x:Name="CommonStates">
    							<VisualState x:Name="Normal"/>
    							<VisualState x:Name="MouseOver"/>
    							<VisualState x:Name="Disabled">
    								<Storyboard>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="HorizontalTrackRectangleDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="ThumbDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    									<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetProperty="Visibility" Storyboard.TargetName="VerticalTrackRectangleDisabledOverlay">
    										<DiscreteObjectKeyFrame KeyTime="0">
    											<DiscreteObjectKeyFrame.Value>
    												<Visibility>Visible</Visibility>
    											</DiscreteObjectKeyFrame.Value>
    										</DiscreteObjectKeyFrame>
    									</ObjectAnimationUsingKeyFrames>
    								</Storyboard>
    							</VisualState>
    						</VisualStateGroup>
    					</VisualStateManager.VisualStateGroups>
    					<Grid x:Name="HorizontalTemplate" Background="Transparent">
    						<Grid.ColumnDefinitions>
    							<ColumnDefinition Width="Auto"/>
    							<ColumnDefinition Width="Auto"/>
    							<ColumnDefinition Width="*"/>
    						</Grid.ColumnDefinitions>
    						<Rectangle x:Name="TrackRectangle" Grid.ColumnSpan="3" Grid.Column="0" Fill="Black" Height="3" Margin="5,0,5,0" RadiusY="1" RadiusX="1" Stroke="White" StrokeThickness="{TemplateBinding BorderThickness}"/>
    						<Rectangle x:Name="HorizontalTrackRectangleDisabledOverlay" Grid.ColumnSpan="3" Grid.Column="0" Fill="White" Height="3" Margin="5,0,5,0" Opacity=".55" RadiusY="1" RadiusX="1" Visibility="Collapsed"/>
    						<RepeatButton x:Name="HorizontalTrackLargeChangeDecreaseRepeatButton" Grid.Column="0" Height="18" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
    						<Thumb x:Name="HorizontalThumb" Background="{TemplateBinding Background}" Grid.Column="1" Height="18" IsTabStop="True" Width="8" Style="{StaticResource InvisibleThumbStyle}"/>
    						<Rectangle x:Name="ThumbDisabledOverlay" Grid.Column="1" Fill="White" Opacity=".55" RadiusY="2" RadiusX="2" Visibility="Collapsed" Width="8"/>
    						<RepeatButton x:Name="HorizontalTrackLargeChangeIncreaseRepeatButton" Grid.Column="2" Height="18" IsTabStop="False" Template="{StaticResource RepeatButtonTemplate}"/>
    					</Grid>
    					<Grid x:Name="VerticalTemplate" Background="Transparent" Visibility="Collapsed">
    						<Grid.RowDefinitions>
    							<RowDefinition Height="*"/>
    							<RowDefinition Height="Auto"/>
    							<RowDefinition Height="Auto"/>
    						</Grid.RowDefinitions>
    						<Rectangle Fill="#FFE6EFF7" Margin="0,5,0,5" RadiusY="1" Grid.Row="0" RadiusX="1" Grid.RowSpan="3" Stroke="#FFA3AEB9" StrokeThickness="{TemplateBinding BorderThickness}" Width="3"/>
    						<Rectangle x:Name="VerticalTrackRectangleDisabledOverlay" Fill="White" Margin="0,5,0,5" Opacity=".55" RadiusY="1" Grid.Row="0" RadiusX="1" Grid.RowSpan="3" Visibility="Collapsed" Width="3"/>
    						<RepeatButton x:Name="VerticalTrackLargeChangeDecreaseRepeatButton" IsTabStop="False" Grid.Row="2" Template="{StaticResource RepeatButtonTemplate}" Width="18"/>
    						<Thumb x:Name="VerticalThumb" Height="11" IsTabStop="True" Grid.Row="1" Width="18" Style="{StaticResource GlassThumbStyle}"/>
    						<RepeatButton x:Name="VerticalTrackLargeChangeIncreaseRepeatButton" IsTabStop="False" Grid.Row="0" Template="{StaticResource RepeatButtonTemplate}" Width="18"/>
    					</Grid>
    				</Grid>
    			</ControlTemplate>
    		</Setter.Value>
    	</Setter>
    </Style>
</ResourceDictionary>